package com.pearadmin.pro.modules.school.service.impl;

import java.util.List;
import java.util.ArrayList;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pearadmin.pro.common.web.base.page.PageResponse;
import com.pearadmin.pro.common.web.base.page.Pageable;

import com.pearadmin.pro.modules.school.domain.CbiSor;
import com.pearadmin.pro.modules.school.domain.CourseBasicInformation;
import com.pearadmin.pro.modules.school.param.CbiSorRequest;
import com.pearadmin.pro.modules.school.repository.CbiSorRepository;
import com.pearadmin.pro.modules.school.service.CbiSorService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * 学校课程代码中间Service业务层处理
 *
 * @author ChenJian
 * @date 2021-08-29
 */
@Service
public class CbiSorServiceImpl extends ServiceImpl<CbiSorRepository, CbiSor> implements CbiSorService
{
    @Resource
    private CbiSorRepository cbiSorRepository;

    /**
     * 查询学校课程代码中间
     * @param request
     * @return 学校课程代码中间 分页集合
     * */
    @Override
    public PageResponse<CbiSor> page(CbiSorRequest request)
    {
        LambdaQueryWrapper<CbiSor> query = new LambdaQueryWrapper<CbiSor>();
        return Pageable.of(request,(()->  cbiSorRepository.selectList(query)));
    }

    /**
     * 查询学校课程代码中间
     *
     * @param id 学校课程代码中间ID
     * @return 学校课程代码中间
     */
    @Override
    public CbiSor selectCbiSorById(Long id)
    {
        return cbiSorRepository.selectById(id);
    }

}
